home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / reve / ctl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  2.3 KB  |  71 lines

  1.  
  2. /*  @(#)ctl.h 1.2 91/11/07
  3.  *
  4.  *  Describes the structure that reve and reved pass back and forth.
  5.  *
  6.  *  Copyright (C) 1990, 1991 - Rich Burridge & Yves Gallot.
  7.  *  All rights reserved.
  8.  *
  9.  *  Permission is granted to copy this source, for redistribution
  10.  *  in source form only, provided the news headers in "substantially
  11.  *  unaltered format" are retained, the introductory messages are not
  12.  *  removed, and no monies are exchanged.
  13.  *
  14.  *  Permission is also granted to copy this source, without the
  15.  *  news headers, for the purposes of making an executable copy by
  16.  *  means of compilation, provided that such copy will not be used
  17.  *  for the purposes of competition in any othello tournaments, without
  18.  *  prior permission from the authors.
  19.  *
  20.  *  No responsibility is taken for any errors on inaccuracies inherent
  21.  *  either to the comments or the code of this program, but if reported
  22.  *  (see README file), then an attempt will be made to fix them.
  23.  */
  24.  
  25. #define  CTL_WAIT           2     /* The amount of time to wait for a
  26.                                      response, in seconds. */
  27. #define  MAX_LIFE           60    /* Maximum time an invitation is saved
  28.                                      by the Reve daemons. */
  29. #define  MSG_INTERVAL       4
  30. #define  NAME_SIZE          9
  31. #define  RING_WAIT          30    /* Time to wait before refreshing invitation
  32.                                      should be 10's of seconds less than
  33.                                      MAX_LIFE */
  34. #define  TTY_SIZE           16
  35.  
  36. #define  LEAVE_INVITE       0     /* The values for type. */
  37. #define  LOOK_UP            1
  38. #define  DELETE             2
  39. #define  ANNOUNCE           3     /* The values for type. */
  40.  
  41. #define  SUCCESS            0     /* The values for answer. */
  42. #define  NOT_HERE           1
  43. #define  FAILED             2
  44. #define  MACHINE_UNKNOWN    3
  45. #define  PERMISSION_DENIED  4
  46. #define  UNKNOWN_REQUEST    5
  47.  
  48. typedef struct ctl_response CTL_RESPONSE ;
  49.  
  50. struct ctl_response {
  51.   char type ;
  52.   char answer ;
  53.   int id_num ;
  54.   enum disp_type dtype ;
  55.   struct sockaddr_in addr ;
  56. } ;
  57.  
  58. typedef struct ctl_msg CTL_MSG ;
  59.  
  60. struct ctl_msg {
  61.   char type ;
  62.   char l_name[NAME_SIZE] ;
  63.   char r_name[NAME_SIZE] ;
  64.   int id_num ;
  65.   int pid ;
  66.   enum disp_type dtype ;
  67.   char r_tty[TTY_SIZE] ;
  68.   struct sockaddr_in addr ;
  69.   struct sockaddr_in ctl_addr ;
  70. } ;
  71.